<!-- Inline template with sidebar items markup and ng-directives-->
<script type="text/ng-template" id="sidebar-renderer.html">
   <span ng-if="item.is_head == 1">{{(item.translate | translate) || item.label}}</span>
   <a ng-if="item.is_head != 1" ng-href="{{$state.href(item.sref)}}" title="{{item.name}}">
       <em ng-if="item.icon" class="{{item.icon}}"></em>
       <div ng-if="item.alert" ng-class="item.label || 'label label-success'" class="pull-right">{{item.alert}}</div>
       <span>{{(item.translate | translate) || item.label}}</span>
    </a>
    <ul ng-if="item.children" uib-collapse="isCollapse(pIndex)" ng-init="addCollapse(pIndex, item)" class="nav sidebar-subnav">
        <li class="sidebar-subnav-header">{{(item.translate | translate) || item.label}}</li>
        <li ng-repeat="item in item.children" ng-include="'sidebar-renderer.html'" ng-class="getMenuItemPropClasses(item)" 
            ng-init="pIndex=(pIndex+'-'+$index); inSubmenu = true" ng-click="toggleCollapse(pIndex)"></li>
    </ul>
</script>
<!-- START Sidebar (left)-->
<div class="aside-inner">
    <nav sidebar="" class="sidebar">
        <!-- START sidebar nav-->
        <ul class="nav">
            <!-- START user info-->
            <li class="has-user-block">
                <div uib-collapse="userBlockVisible">
                    <div class="item user-block">
                        <!-- User picture-->
                        <div class="user-block-picture">
                            <div class="user-block-status">
                                <img ng-src="{{app.user.faceUrl}}" alt="Avatar" width="60" height="60" class="img-thumbnail img-circle" />
                                <div class="circle circle-success circle-lg"></div>
                            </div>
                        </div>
                        <!-- Name and Job-->
                        <div class="user-block-info">
                            <span class="user-block-name">{{'sidebar.WELCOME' | translate}} {{app.user.name}}</span>
                        </div>
                    </div>
                </div>
            </li>
            <!-- END user info-->
            <!-- Iterates over all sidebar items-->
            <li ng-class="getMenuItemPropClasses(item)" ng-repeat="item in menuItems" ng-init="pIndex = $index" ng-include="'sidebar-renderer.html'" ng-click="toggleCollapse(pIndex, true)"></li>
        </ul>
        <!-- END sidebar nav-->
    </nav>
</div>
<!-- END Sidebar (left)-->